package com.hulang.sms.sending.api;


import com.hulang.sms.sending.bean.ApiResult;
import com.hulang.sms.sending.bean.SendParam;
import com.hulang.sms.sending.service.SendingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;


@SpringBootApplication
@RestController
@RequestMapping("/api/sms")

public class SendingController {

    @Autowired
    SendingService sendingService;

    /**
     * 发送短信
     *
     * @param sendParam
     * @param request
     * @return
     */
    @RequestMapping(value = "/send/aliyun", method = RequestMethod.POST)
    public ApiResult smsSendForAliYun(@RequestBody SendParam sendParam, HttpServletRequest request) {

        return sendingService.smsSendForAliYun(sendParam, request);
    }


}
